package com.jrx.anytxn.param.enums;

public enum RightsAndActivityLimitTimeEnum {
    //半价活动抢券限制时间
    LIMIT_TIME_DEFAULT("0", "默认值"),

    LIMIT_TIME_YEAR("1", "年"),

    LIMIT_TIME_QUARTER("2", "季"),

    LIMIT_TIME_MONTH("3", "月"),

    LIMIT_TIME_WEEK("4", "周");


    private String description;
    private String code;


    RightsAndActivityLimitTimeEnum(String code, String description) {
        this.code = code;
        this.description = description;
    }

    //供switch获取常量
    public static RightsAndActivityLimitTimeEnum getEnumCode (String str) {
        for(RightsAndActivityLimitTimeEnum limitTimeEnum:values()){
            if(limitTimeEnum.code.equals(str)){
                return limitTimeEnum;
            }
        }
        return null;
    }


    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }
    public void setDescription(String description) {
        this.description = description;
    }

    public void setCode(String code) {
        this.code = code;
    }

}
